Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Group By All #964

Merged
merged 6 commits into from
Sep 8, 2023
Merged

feat: Group By All #964

merged 6 commits into from
Sep 8, 2023

Conversation

berkaysynnada
Copy link
Contributor

There exists a GROUP BY usage with ALL keyword in some platforms (https://docs.snowflake.com/en/sql-reference/constructs/group-by#label-group-by-all-columns, https://duckdb.org/docs/sql/query_syntax/groupby.html).

It groups together all the columns in the SELECT statement that aren't enclosed within aggregate functions. This streamlines the syntax by keeping the list of columns in one place and helps avoid errors by ensuring that the level of detail in your SELECT matches the grouping in your GROUP BY clause.

When this PR is merged, Datafusion part will be opened. Exclude support will also be on the following PR's.

@berkaysynnada
Copy link
Contributor Author

Hi @alamb, could you please take a look? The Datafusion part is also set, and once this PR is merged, I'll be able to open its corresponding PR.

@alamb
Copy link
Contributor

alamb commented Sep 7, 2023

I will do so -- thanks @berkaysynnada

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- thank you @berkaysynnada

src/ast/query.rs Outdated Show resolved Hide resolved
@alamb
Copy link
Contributor

alamb commented Sep 8, 2023

looks like there was a logical conflict on main. I will fix that

Update: @ding-young fixed it in #965

I think it you merge up from main this PR will pass CI

@alamb alamb merged commit bb7b05e into apache:main Sep 8, 2023
10 checks passed
@alamb
Copy link
Contributor

alamb commented Sep 8, 2023

Thanks @berkaysynnada !@

serprex pushed a commit to serprex/sqlparser-rs that referenced this pull request Nov 6, 2023
@berkaysynnada berkaysynnada deleted the feature/groupby-all branch November 10, 2023 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants